#include <cstring>

class Array2D {
   private:
    int r;
    int c;
    float* p;

   public:
    Array2D(int r, int c) : r(r), c(c) {
        p = new float[r * c];
    }
    virtual ~Array2D() {
        delete[] p;
    }
    float* row(int row) {
        return p + row * c;
    }
    Array2D(const Array2D& that);
};